Integrand size = 28, antiderivative size = 106 \[ \int \frac {(a+i a \tan (e+f x))^2}{c+d \tan (e+f x)} \, dx=-\frac {a^2 c (c+i d) x}{(c-i d) d^2}+\frac {a^2 (c+2 i d) x}{d^2}+\frac {a^2 \log (\cos (e+f x))}{d f}-\frac {a^2 (i c-d) \log (c \cos (e+f x)+d \sin (e+f x))}{d (i c+d) f} \]
[Out]
Time = 0.14 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {3622, 3556, 3565, 3611} \[ \int \frac {(a+i a \tan (e+f x))^2}{c+d \tan (e+f x)} \, dx=-\frac {a^2 c x (c+i d)}{d^2 (c-i d)}+\frac {a^2 x (c+2 i d)}{d^2}-\frac {a^2 (-d+i c) \log (c \cos (e+f x)+d \sin (e+f x))}{d f (d+i c)}+\frac {a^2 \log (\cos (e+f x))}{d f} \]
[In]
[Out]
Rule 3556
Rule 3565
Rule 3611
Rule 3622
Rubi steps \begin{align*} \text {integral}& = \frac {a^2 (c+2 i d) x}{d^2}-\frac {a^2 \int \tan (e+f x) \, dx}{d}+\frac {(-i a c+a d)^2 \int \frac {1}{c+d \tan (e+f x)} \, dx}{d^2} \\ & = -\frac {a^2 c (c+i d) x}{(c-i d) d^2}+\frac {a^2 (c+2 i d) x}{d^2}+\frac {a^2 \log (\cos (e+f x))}{d f}+\frac {(-i a c+a d)^2 \int \frac {d-c \tan (e+f x)}{c+d \tan (e+f x)} \, dx}{d \left (c^2+d^2\right )} \\ & = -\frac {a^2 c (c+i d) x}{(c-i d) d^2}+\frac {a^2 (c+2 i d) x}{d^2}+\frac {a^2 \log (\cos (e+f x))}{d f}-\frac {a^2 (i c-d) \log (c \cos (e+f x)+d \sin (e+f x))}{d (i c+d) f} \\ \end{align*}
Time = 1.19 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.56 \[ \int \frac {(a+i a \tan (e+f x))^2}{c+d \tan (e+f x)} \, dx=\frac {i a^2 (2 d \log (i+\tan (e+f x))+i (c+i d) \log (c+d \tan (e+f x)))}{(c-i d) d f} \]
[In]
[Out]
Time = 0.33 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.79
method | result | size |
norman | \(\frac {2 a^{2} x}{-i d +c}+\frac {i a^{2} \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{f \left (-i d +c \right )}-\frac {\left (i a^{2} d +a^{2} c \right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{d f \left (-i d +c \right )}\) | \(84\) |
derivativedivides | \(\frac {a^{2} \left (\frac {\frac {\left (2 i c -2 d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (2 i d +2 c \right ) \arctan \left (\tan \left (f x +e \right )\right )}{c^{2}+d^{2}}+\frac {\left (-2 i c d -c^{2}+d^{2}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right ) d}\right )}{f}\) | \(95\) |
default | \(\frac {a^{2} \left (\frac {\frac {\left (2 i c -2 d \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2}+\left (2 i d +2 c \right ) \arctan \left (\tan \left (f x +e \right )\right )}{c^{2}+d^{2}}+\frac {\left (-2 i c d -c^{2}+d^{2}\right ) \ln \left (c +d \tan \left (f x +e \right )\right )}{\left (c^{2}+d^{2}\right ) d}\right )}{f}\) | \(95\) |
parallelrisch | \(\frac {2 i x \,a^{2} d^{2} f +i \ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a^{2} c d -2 i \ln \left (c +d \tan \left (f x +e \right )\right ) a^{2} c d +2 x \,a^{2} c d f -\ln \left (1+\tan ^{2}\left (f x +e \right )\right ) a^{2} d^{2}-\ln \left (c +d \tan \left (f x +e \right )\right ) a^{2} c^{2}+\ln \left (c +d \tan \left (f x +e \right )\right ) a^{2} d^{2}}{f \left (c^{2}+d^{2}\right ) d}\) | \(132\) |
risch | \(-\frac {2 a^{2} x}{i d -c}-\frac {2 i a^{2} x}{d}-\frac {2 i a^{2} e}{d f}+\frac {2 a^{2} e}{f \left (i d -c \right )}-\frac {2 i a^{2} c x}{d \left (i d -c \right )}-\frac {2 i a^{2} c e}{d f \left (i d -c \right )}+\frac {a^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )}{d f}+\frac {i a^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right )}{f \left (i d -c \right )}+\frac {a^{2} \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {i d +c}{i d -c}\right ) c}{d f \left (i d -c \right )}\) | \(225\) |
[In]
[Out]
none
Time = 0.25 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.79 \[ \int \frac {(a+i a \tan (e+f x))^2}{c+d \tan (e+f x)} \, dx=\frac {{\left (-i \, a^{2} c + a^{2} d\right )} \log \left (\frac {{\left (i \, c + d\right )} e^{\left (2 i \, f x + 2 i \, e\right )} + i \, c - d}{i \, c + d}\right ) + {\left (i \, a^{2} c + a^{2} d\right )} \log \left (e^{\left (2 i \, f x + 2 i \, e\right )} + 1\right )}{{\left (i \, c d + d^{2}\right )} f} \]
[In]
[Out]
Time = 3.63 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.87 \[ \int \frac {(a+i a \tan (e+f x))^2}{c+d \tan (e+f x)} \, dx=\frac {a^{2} \log {\left (e^{2 i f x} + e^{- 2 i e} \right )}}{d f} - \frac {a^{2} \left (c + i d\right ) \log {\left (e^{2 i f x} + \frac {\left (a^{2} c + i a^{2} d + \frac {i a^{2} d \left (c + i d\right )}{c - i d}\right ) e^{- 2 i e}}{a^{2} c} \right )}}{d f \left (c - i d\right )} \]
[In]
[Out]
none
Time = 0.53 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.08 \[ \int \frac {(a+i a \tan (e+f x))^2}{c+d \tan (e+f x)} \, dx=\frac {\frac {2 \, {\left (a^{2} c + i \, a^{2} d\right )} {\left (f x + e\right )}}{c^{2} + d^{2}} - \frac {{\left (a^{2} c^{2} + 2 i \, a^{2} c d - a^{2} d^{2}\right )} \log \left (d \tan \left (f x + e\right ) + c\right )}{c^{2} d + d^{3}} - \frac {{\left (-i \, a^{2} c + a^{2} d\right )} \log \left (\tan \left (f x + e\right )^{2} + 1\right )}{c^{2} + d^{2}}}{f} \]
[In]
[Out]
none
Time = 0.46 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.15 \[ \int \frac {(a+i a \tan (e+f x))^2}{c+d \tan (e+f x)} \, dx=\frac {\frac {a^{2} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{d} + \frac {4 i \, a^{2} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + i\right )}{c - i \, d} + \frac {a^{2} \log \left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}{d} - \frac {{\left (a^{2} c + i \, a^{2} d\right )} \log \left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 2 \, d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - c\right )}{c d - i \, d^{2}}}{f} \]
[In]
[Out]
Time = 6.19 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.60 \[ \int \frac {(a+i a \tan (e+f x))^2}{c+d \tan (e+f x)} \, dx=\frac {a^2\,\ln \left (\mathrm {tan}\left (e+f\,x\right )+1{}\mathrm {i}\right )\,2{}\mathrm {i}}{f\,\left (c-d\,1{}\mathrm {i}\right )}-\frac {a^2\,\ln \left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )\,\left (c+d\,1{}\mathrm {i}\right )}{d\,f\,\left (c-d\,1{}\mathrm {i}\right )} \]
[In]
[Out]